cmake_minimum_required(VERSION 2.8.3)
project(StereoRectify)

IF(NOT CMAKE_BUILD_TYPE)
   set(CMAKE_BUILD_TYPE Release)
ENDIF()
MESSAGE("Build type: " ${CMAKE_BUILD_TYPE})

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}  -Wall  -O3 -march=native ")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall  -O3 -march=native")


# 要保证整个工程的opencv版本一致，包括dbow，源码以及ros相关的
# 3 4 都可以正常运行
find_package(OpenCV 4.2)
if(NOT OpenCV_FOUND)
   message(FATAL_ERROR "OpenCV > 4.2 not found.")
endif()

add_executable(compute_P compute_P.cpp)
target_link_libraries(compute_P ${OpenCV_LIBS})

